CREATE TABLE [dbo].[TMPLAN_CORP]
(
[CO_CNTA_CORP] [dbo].[TD_VC_020_CNTA] NOT NULL,
[NU_ANNO] [dbo].[TD_IN_004_ANNO] NOT NULL CONSTRAINT [DF__TMPLAN_CO__NU_AN__55BFB948] DEFAULT (datepart(year,getdate())),
[DE_CNTA_CORP] [dbo].[TD_VC_050] NOT NULL,
[CO_MONE] [dbo].[TD_VC_003] NULL,
[CO_BALA] [dbo].[TD_VC_003] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL,
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMPLAN_CO__FE_US__57A801BA] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL,
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMPLAN_CO__FE_US__589C25F3] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMPLAN_CORP] ADD CONSTRAINT [CK__TMPLAN_CO__CO_CN__54CB950F] CHECK (([CO_CNTA_CORP]>='0' AND [CO_CNTA_CORP]<='99999999999999999999'))
GO
ALTER TABLE [dbo].[TMPLAN_CORP] ADD CONSTRAINT [CK__TMPLAN_CO__NU_AN__56B3DD81] CHECK (([NU_ANNO]>=(0)))
GO
ALTER TABLE [dbo].[TMPLAN_CORP] ADD CONSTRAINT [TMPLAN_CNT_18226295361] PRIMARY KEY CLUSTERED  ([CO_CNTA_CORP]) ON [PRIMARY]
GO
